<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>弓友之家</title>
    <link rel="stylesheet" href="css/mui.css" />
    <link rel="stylesheet" href="fonts/iconfont.css" />
    <link rel="stylesheet" href="css/style.css" />
</head>
<body>
	<header class="mui-bar mui-bar-nav">
		<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		<h1 class="mui-title">会员详情</h1>
		<a class="mui-icon mui-icon-more-filled mui-pull-right shareBtn"></a>
	</header>
	<div class="mui-content">
		<div class="member-page">
			<div class="memder-detail mui-clearfix">
				<div class="img mui-pull-left">
					<img src="images/defaultimg.jpg" class="touxiang" data-preview-src="" data-preview-group="1" />
				</div> 
				<div class="text mui-pull-right">
					<p class="realname"></p>
					<p class="mobile">电话：</p>
					<p class="number">编号：</p>
					<!--<p class="sumer">总积分：</p>-->
					<p class="name">隶属：</p>
					<!--<button type="button" onclick="message()">给他留言</button>-->
				</div>
			</div>
			<h3>个人主要简介：</h3>
			<article class="desc">
				
			</article>
			<h3>比赛历史记录：</h3>
			<article class="content">
				
			</article>
		</div>
	</div>
	<!--分享-->
	<div class="shareWx mui-hidden"> 
		<ul class="mui-list-unstyled">
			<li class="tel"><a href="javascript:void(0)" onclick="shareWeixinMessage(1)">微信好友</a></li>
			<li class="qq"><a href="javascript:void(0)" onclick="shareWeixinMessage(2)">朋友圈</a></li>
		</ul>
		<button type="button" class="cancleShare">取消</button>
	</div>
	<br /><br />
	<!--留言框-->
	<div class="message-box mui-hidden">
		<form>
			<input type="text" id="content" placeholder="输入留言内容" />
			<button type="button" onclick="sub()">提交</button>
		</form>
	</div>
	<br />
	<script type="text/javascript" src="js/mui.min.js" ></script>
	<script type="text/javascript" src="js/jquery-1.8.3.min.js" ></script>
	<script type="text/javascript" src="js/common.js" ></script>
	<script type="text/javascript" src="js/mui.zoom.js" ></script>
	<script type="text/javascript" src="js/mui.previewimage.js" ></script>
	<script type="text/javascript" charset="utf-8">
      	mui.init();
      	var id=0;
      	var perimg="";
      	var pername="";
      	var perdesc="";
      	mui.plusReady(function(){
      		var _self=plus.webview.currentWebview();
      		id=_self.mid;
      		mui.ajax(H_SRC+'/amier/user/m_detail',{
				data:{
					token:token,
					id:id
				},
				dataType:'json',
				type:'post',
				timeout:10000,             
				success:function(data){
					var dataurl=data.data;
					if(data.code == 1){
						$(".content").html(dataurl.content);
						$(".desc").html(dataurl.desc);
						$(".realname").html(dataurl.realName);
						$(".age").html('年龄：'+dataurl.age);
						$(".mobile").html('电话：'+dataurl.mobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2'));
						$(".number").html('编号：'+dataurl.number);
						$(".name").html('隶属：'+dataurl.name);
//						$(".sumer").html('总积分：'+dataurl.score);
						$(".touxiang").attr("src",H_SRC+''+dataurl.touxiang);
						perimg=H_SRC+dataurl.touxiang;
						pername=dataurl.realName;
						perdesc=dataurl.number+" "+dataurl.name;
					}else{
						mui.toast(data.msg);
					}
				},
				error:function(){
					
				}
			}) 
      	})
      	mui.previewImage();
      	function message(){
      		$(".message-box").removeClass("mui-hidden");
      	}
      	
      	function shareWeixinMessage(type){
			var type=type;
			if(type==1){
				var secne="WXSceneSession"
			}else{
				var secne="WXSceneTimeline"
			}
			sharewx.send( 
				{ 
					title:pername,
					content:perdesc, 
					href:H_SRC+'/personal_detail/'+id,
					thumbs: [perimg], 
		        	pictures: [perimg], 
					extra:{scene:secne}
				}, 
				function(){
					mask.close();
					$(".shareWx").addClass("mui-hidden");
					mui.toast( "分享成功！" );
				}, function(e){
					mask.close();
					$(".shareWx").addClass("mui-hidden");
					mui.toast( "取消分享");
				}
			);
		}
    </script>
</body>
</html>